/**
 * Created by LeungZ on 2016/10/17.
 */
class Ctrl {
    constructor($scope,appSrv) {
        "ngInject";
        // this.cpuReq = appSrv._cpuReq;
        // this.memReq = appSrv._memReq;
        // this.memUnit = appSrv._memUnit;
        this._appSrv = appSrv;
        this.service = $scope.service;
        this.CpuInfo();
    }
    CpuInfo(){
    this._appSrv.getConfig().then(data=>{
    this.logPath = data['log.hostPath'];
    this.cpuReq = data['cpu.request'];
    this.memReq = data['memory.request'];
    this.memUnit = data['memory.unit'];
    this.dfPort = data['deployment.externalPort'];
    this.service._memorylimit = Number(data['memory.limit']);
    this.service._cpulimit = Number(data['cpu.limit']);
    }).catch(data=>{
        this._notification.error('cpu数据有误');
    })
    }
}
export default Ctrl